Skip to content

Conversation

@nhz2
Copy link
Member

@nhz2 nhz2 commented Dec 7, 2025

Fixes #7

This is a breaking change.

The array element type now must be isbitstype:
Before, the chain of structs just had to be immutable. However, as seen in #7, the exact memory layout of non isbitstype structs is currently not well documented.

Switch from pointer to the strided array interface:
The pointer function is not recommended, and has subtle gotchas, especially if Julia is run with a moving GC.
The strided array interface is being used as documented in JuliaLang/julia#59466

The aref(a)[1]._3 syntax for accessing a field index is replaced with aref(a)[1].:3 or getproperty(aref(a)[1], 3).

This simplifies the code and avoids ambiguities when a field might be named _3.

@nhz2 nhz2 merged commit 72eb213 into main Dec 7, 2025
24 checks passed
@nhz2 nhz2 deleted the fix-memory-safety branch December 7, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault when using types that can have undefined fields

2 participants